<?php

namespace app\applet\middleware;

class CheckParkingNo
{
    public function handle($request, \Closure $next)
    {
        //echo '123';
        $parkingNo=request()->header("parkingNo");
        if(empty($parkingNo)){
            return json(["code"=>500,'msg' => "车场信息不存在"]);
        }
        $request->parkingNo= $parkingNo;

        return $next($request);  //返回request闭包 固定格式写到这里
    }
}
